<?php
/**
 * @version		$Id: default.php 3 2011-12-16 20:19:15Z netix.mail@gmail.com $
 * @package		ALM Hoster
 * @desription	Web hosting and domain menager for resellers
 * @subpackage	Components
 * @copyright	Copyright (C) 2011 ALM Studio. All rights reserved.
 * @author		ALM Studio
 * @email		info@alm-studio.net
 * @link		http://alm-studio.net
 * @license		Commercial
 */
 
defined('_JEXEC') or die('Restricted Access');

JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
JHtml::_('behavior.tooltip');
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>
<div><?php echo $this->loadTemplate('menu');?></div>
<form action="<?php echo JRoute::_('index.php?option=com_almhoster&view=invoices'); ?>" method="post" name="adminForm">
<table class="tabela">
	<thead>
		<tr>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_INVOICE_ID', 'InvoiceId', $listDirn, $listOrder); ?>
			</th>			
			<th class="title">
				<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_INVOICE_PRODUCT', 'InvoiceProduct', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_INVOICE_DATE', 'InvoiceDate', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_INVOICE_AMOUNT', 'InvoiceAmount', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_INVOICE_DUE', 'InvoiceDue', $listDirn, $listOrder); ?>
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_INVOICE_STATUS', 'InvoiceStatus', $listDirn, $listOrder); ?>
			</th>
		</tr>
	</thead>
	<tbody>
		<?php foreach($this->items as $i => $item): ?>
		<tr class="row<?php echo $i % 2; ?>">
			<td>
				<?php printf("%05d",$item->InvoiceId); ?>
			</td>
			<td>
			<a href="<?php echo JRoute::_('index.php?option=com_almhoster&view=invoice&InvoiceId=' . $item->InvoiceId); ?>">
				<?php echo $item->InvoiceProduct; ?>
				</a>
			</td>
			<td>
				<?php echo $item->InvoiceDate; ?>
			</td>
			<td>
				<?php echo $item->InvoiceAmount; ?>
			</td>
			<td align="center">
				<?php echo $item->InvoiceDue; ?>
			</td>
			<td align="center">
				<?php echo $item->InvoiceStatus; ?>
			</td>				
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
	<div>
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
